/*
package com.its.controller;

import com.its.domain.BaseResult;
import com.its.manager.pojo.Role;
import com.its.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/role")
public class RoleController {
    //注入业务层属性
    @Autowired
    private RoleService roleService;

    //声明单元方法：新增角色
    @PostMapping("/add")
    public BaseResult addRole(@RequestBody Role role){
        return BaseResult.ok(roleService.addRoleService(role));
    }

    //声明单元方法：修改角色
    @PutMapping("/update")
    public BaseResult updateRole(@RequestBody Role role){
        return BaseResult.ok(roleService.updateRoleService(role));
    }

    //声明单元方法：删除角色
    @DeleteMapping("/delete")
    public BaseResult deleteRole(Long rid){
        return BaseResult.ok(roleService.deleteRoleService(rid));
    }

    //声明单元方法：根据Id查询角色信息
    */
/*@GetMapping("/findById")
    public BaseResult getRole(Long rid){
        return BaseResult.ok(roleService.selectRoleByIdService(rid));
    }*//*


    //声明单元方法：分页查询角色信息
    @GetMapping("/search")
    public BaseResult getAllRole(Integer page,Integer size){
        return BaseResult.ok(roleService.selectRoleByPageService(page, size));
    }

    //声明单元方法：修改权限信息
    @PutMapping("/updatePermissionToRole")
    public BaseResult update(Long rid,Long[] pids){
        return BaseResult.ok(roleService.updateRoleService(rid, pids));
    }
}
*/
